Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tracerbench/trace-event

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tracerbench/trace-event

Chrome Trace Events interfaces

  • 8.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@tracerbench/trace-event

Typescript interfaces and constants enum for Chrome Devtools Protocol traces.

The Constants enum is a const enum so if you are compiling with tsc it will compile out.

Example

import type { MetadataTraceEvent, TraceEvent, TraceStreamJson } from '@tracerbench/trace-event';
import { Constants } from '@tracerbench/trace-event';
import { readFileSync } from 'fs';
const trace: TraceEvent[] | TraceStreamJson = JSON.parse(readFileSync('trace.json', 'utf8'));
const traceEvents = Array.isArray(trace) ? trace : trace.traceEvents;
traceEvents.sort((a, b) => a.ts - b.ts);
const metadata: MetadataTraceEvent[] = traceEvents.filter((event) => event.ph === Constants.TRACE_EVENT_PHASE_METADATA);

Keywords

FAQs

Package last updated on 30 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc